package gps.monitor.gpsbootstrap.tool;

import cn.cyq.anno.JMJsonModel;
import lombok.Data;

import java.io.Serializable;

/**
 * @author cyq
 * @date 2021/11/6
 * @desc talk is cheep,show me the code
 */
@Data
@JMJsonModel
public final class ApiJsonResult<T> implements Serializable {

    public static final long serialVersionUID = -1L;

    private T data;

    private String code;

    private String msg;

    public ApiJsonResult(T data, String code, String msg) {
        this.data = data;
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "{" +
                "data=" + data +
                ", code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                '}';
    }
}
